package com.turing.post.organization.util;

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name = "MERCHANTCONTRACT")
public class MerchantContract implements java.io.Serializable {
	
	/**
	 * 基本策略 固定比率
	 */
	public static final String POLICY_FIXEDRATE = "0";
	/**
	 * 基本策略 差额无追溯
	 */
	public static final String POLICY_NORETROSPECTIVE = "1";
	/**
	 * 基本策略 阶梯追溯
	 */
	public static final String POLICY_LADDERRETROSPECTIVE = "2";
	/**
	 * 基本策略 按商户业务类型结算
	 */
	public static final String POLICY_BYBUSINESSTYPE = "3";
	
	/**
	 * 特约商户合同管理  合同id
	 */
	private BigInteger contractId;
	
	@Id
	@Column(name = "CONTRACTID", nullable = false)
	public BigInteger getContractId() {
		return contractId;
	}

	public void setContractId(BigInteger contractId) {
		this.contractId = contractId;
	}
	
	/**
	 * 合同编号
	 */
	private String contractNo;
	@Column(name = "CONTRACTNO", nullable = false)
	public String getContractNo() {
		return contractNo;
	}

	public void setContractNo(String contractNo) {
		this.contractNo = contractNo;
	}
	
	/**
	 * 商户ID,外键
	 */
	private String merchantNo;
	@Column(name = "MERCHANTNO", nullable = false)
	public String getMerchantNo() {
		return merchantNo;
	}

	public void setMerchantNo(String merchantNo) {
		this.merchantNo = merchantNo;
	}
	
	/**
	 * 合同标题
	 */
	private String contractTitle;
	@Column(name = "CONTRACTTITLE", nullable = false)
	public String getContractTitle() {
		return contractTitle;
	}

	public void setContractTitle(String contractTitle) {
		this.contractTitle = contractTitle;
	}
	
	/**
	 * 起始日期
	 */
	private Date startDate;
	@Column(name = "STARTDATE", nullable = false)
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	/**
	 * 终止日期
	 */
	private Date endDate;
	@Column(name = "ENDDATE", nullable = false)
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	/**
	 * 结算规则
	 */
	private String settRule;
	@Column(name = "SETTRULE", nullable = false)
	public String getSettRule() {
		return settRule;
	}

	public void setSettRule(String settRule) {
		this.settRule = settRule;
	}
	
	/**
	 * 结算周期
	 */
	private Integer settCycle;
	@Column(name = "settCycle", nullable = false)
	public Integer getSettCycle() {
		return settCycle;
	}

	public void setSettCycle(Integer settCycle) {
		this.settCycle = settCycle;
	}
	
	/**
	 * 状态
	 */
	private String status;
	/**
	 * 0-无效
	 */
	public final static String STATUS_INVALID = "0";

	/**
	 * 1-无效待审核
	 */
	public final static String STATUS_INVALID_WAIT_AUTH = "1";

	/**
	 * 2-生效
	 */
	public final static String STATUS_VALID = "2";

	/**
	 * 3-生效待审核
	 */
	public final static String STATUS_VALID_WAIT_AUTH = "3";
	/**
	 * 5-待审核
	 */
	public final static String STATUS_WAIT_AUTH = "5";
	
	@Column(name = "STATUS", nullable = false)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	/**
	 * 文件编号
	 */
	private BigInteger fileId;
	@Column(name = "FILEID", nullable = false)
	public BigInteger getFileId() {
		return fileId;
	}

	public void setFileId(BigInteger fileId) {
		this.fileId = fileId;
	}
	
	/**
	 * 录入人
	 */
	private BigInteger operId;
	@Column(name = "OPERID", nullable = false)
	public BigInteger getOperId() {
		return operId;
	}

	public void setOperId(BigInteger operId) {
		this.operId = operId;
	}
	
	/**
	 * 录入时间
	 */
	private Date createTime;
	@Column(name = "CREATETIME", nullable = false)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	/**
	 * 审核人
	 */
	private BigInteger authId;
	@Column(name = "AUTHID", nullable = true)
	public BigInteger getAuthId() {
		return authId;
	}

	public void setAuthId(BigInteger authId) {
		this.authId = authId;
	}
	
	/**
	 * 审核时间
	 */
	private Date authTime;
	@Column(name = "AUTHTIME", nullable = true)
	public Date getAuthTime() {
		return authTime;
	}

	public void setAuthTime(Date authTime) {
		this.authTime = authTime;
	}
	
	/**
	 * 乙方签署人
	 */
	private String issueOper;
	@Column(name = "ISSUEOPER", nullable = false)
	public String getIssueOper() {
		return issueOper;
	}

	public void setIssueOper(String issueOper) {
		this.issueOper = issueOper;
	}
	
	/**
	 * 甲方签署人
	 */
	private String merchantOper;
	@Column(name = "MERCHANTOPER", nullable = false)
	public String getMerchantOper() {
		return merchantOper;
	}

	public void setMerchantOper(String merchantOper) {
		this.merchantOper = merchantOper;
	}
	
	/**
	 * 备注
	 */
	private String remark;
	@Column(name = "REMARK", nullable = true)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	/**
	 * 基本策略
	 */
	private String policy;
	@Column(name = "POLICY", nullable = true)
	public String getPolicy() {
		return policy;
	}

	public void setPolicy(String policy) {
		this.policy = policy;
	}	
}
